<template>
  <div>
    <div id="cesiumContainer"></div>
  </div>
</template>

<script>
import viewerInit from  "../../cesiumPlugin/viewerInit"
import LayerManager from '../../cesiumPlugin/layerManager'
export default {
  name: 'CesiumContainer',
  mounted(){
    //初始化viewer
    viewerInit();
    
    window.layerManager = new LayerManager(viewer);
    window.fmh = new YsCesium(viewer)
    // layerManager.addLayer('geojson',jsonObj)

    // Cesium.GeoJsonDataSource.load('./data/geojson/海南省.json').then(function(dataSource) {
    //   viewer.dataSources.add(dataSource);

    //   var entities = dataSource.entities.values;

      
    // });
    //江苏
    // var palaceTileset = new Cesium.Cesium3DTileset({
    //     url: '/api/tileset.json'
    // })
    // palaceTileset.readyPromise.then(
    //   ()=>{
    //     console.log("ASD")
    //     viewer.scene.primitives.add(palaceTileset); 
    //   }
    // )
    layerManager.fly(111.09428997268884,7.614802431023925,1137850,6.26090081991667,-0.7872075317732907,0.000025874450272134197)
    
  }
}
</script>


<style scoped>
  #cesiumContainer{
    position:absolute;
    width:100%;
    height:100%;
    background:#000;
  }
  #app .cesium-widget-credits{
    display:none!important;
    visibility: hidden!important;
  }
</style>
